package com.cykj.service.imp;

import com.cykj.bean.Tblgood;
import com.cykj.bean.Tblparameter;
import com.cykj.mapper.GameMallMapper;
import com.cykj.service.GameMallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class GameMallServiceImp implements GameMallService {
    @Autowired
    private GameMallMapper gameMallMapper;
    @Override
    public ArrayList<Tblgood> findGoodList(int size, int page,String name,int type) {
        page = (page -1) * size;
        return gameMallMapper.findGoodList(size, page,name,type);
    }

    @Override
    public int cuontGoodList( String name, int type) {
        return gameMallMapper.cuontGoodList(name, type);
    }

    @Override
    public ArrayList<Tblparameter> findGameTypeList() {
        ArrayList<Tblparameter> gameTypeList = gameMallMapper.findGameTypeList(3);
        return gameTypeList;
    }
}
